package cn.pli.bike.ui;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.TextView;

import com.framemodule.base.BaseDelegate;

import cn.pli.bike.R;

/**
 * Created by shangdongzhou on 2017/11/8.
 */

public class JourneyDetailDelegate extends BaseDelegate {


    private RecyclerView recyclerView;
    private JourneyDetailAdapter userInfoAdapter;
    private TextView tvTitle;


    @Override
    public void initTitleBar() {

    }

    @Override
    public int getRootLayoutId() {
        return R.layout.activity_journey_detail;
    }

    @Override
    public void initWidget() {
        super.initWidget();
        recyclerView = get(R.id.recycler_user_info);
        recyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity()));
        userInfoAdapter = new JourneyDetailAdapter(recyclerView);
        recyclerView.setAdapter(userInfoAdapter);
        tvTitle = get(R.id.tv_title);
        tvTitle.setText(R.string.ride_record);


    }


    public JourneyDetailAdapter getUserInfoAdapter() {
        return userInfoAdapter;
    }


    public RecyclerView getRecyclerView() {
        return recyclerView;
    }


}
